#!/bin/bash

chemin_tomcat="/Users/integration/tomcat/apache-tomcat-6.0.36/"

ps aux | grep tomcat | grep -v grep 2>/dev/null 1>&2
if [ $? -eq 0 ] ; then
$chemin_tomcat/bin/shutdown.sh
fi
cp /Users/integration/target/*.war $chemin_tomcat/webapps
rm -r $chemin_tomcat/temp $chemin_tomcat/work
mkdir $chemin_tomcat/temp $chemin_tomcat/work
$chemin_tomcat/bin/startup.sh